package tk.mybatis.springboot.test;

import java.util.concurrent.ConcurrentHashMap;

public class CountLimitControl {

    private int allCount;

    private ConcurrentHashMap<String, Control> map;

    public CountLimitControl(int allCount) {
        this.allCount = allCount;
        map = new ConcurrentHashMap<>();
    }

    public int canPass() {
        long currentTimeMillis = System.currentTimeMillis();
        return 1;
    }


    class Control {
        private Long time;
        private Integer count;

        public Long getTime() {
            return time;
        }

        public void setTime(Long time) {
            this.time = time;
        }

        public Integer getCount() {
            return count;
        }

        public void setCount(Integer count) {
            this.count = count;
        }
    }
}